//
//  YBMineSettingCell.swift
//  Moonlight
//
//  Created by Penlon Kim on 2023/6/9.
//  Copyright © 2023 Moonlight Game Streaming Project. All rights reserved.
//

import UIKit
import SnapKit

class YBMineSettingCell: UITableViewCell {
    
    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        
        self.selectionStyle = .none
        self.backgroundColor = .clear
        contentView.backgroundColor = .clear
        
        contentView.addSubview(_contentView)
        _contentView.addSubviews([kTitleLabel, arrowImgView])
        
        _contentView.snp.makeConstraints { make in
            make.top.equalToSuperview()
            make.left.right.equalToSuperview().inset(10)
            make.bottom.equalTo(-2)
            make.height.equalTo(46)
        }
        
        kTitleLabel.snp.makeConstraints { make in
            make.centerY.equalToSuperview()
            make.left.equalTo(20)
        }
        
        arrowImgView.snp.makeConstraints { make in
            make.centerY.equalToSuperview()
            make.right.equalTo(-20)
            make.size.equalTo(CGSizeMake(8, 12))
        }
        
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    // MARK: - lazy
    private lazy var _contentView: UIView = {
        let view = UIView(color: .lightWhiteDark33)
        view.bk_addStyleWith(cornerRadius: 4, corners: .allCorners)
        return view
    }()
    
    lazy var kTitleLabel = self.bk_addLabel(font: .systemFont(ofSize: 14), bgColor: .clear, textColor: .lightBlack51DarkLight230)
    
    private lazy var arrowImgView = UIImageView(image: UIImage(named: "icon_arrow_right_gray"))
    
}
